home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 April
/
EnigmA AMIGA RUN 26 (1998)(G.R. Edizioni)(IT)[!][issue 1998-04].iso
/
classx
/
util
/
xfa_util
/
arexx
/
imagefx_animtoxfa.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-03-09
|
3KB
|
87 lines
/*
** Anim To XFA REQUESTER - ImageFX Arexx Script Converter
** This code shows how to open a File Requester
** For setting Input Anim Name and Output Anim Name.
**
** This code (C)Copyright Fabio Rotondo.
** It is given as Freeware example and may not be used
** for any commercial product.
**
*/
outname = "RAM:T/Frame"
ADDRESS "IMAGEFX.1" /* Let's ADDRESS ImageFX */
OPTIONS RESULTS
RequestFile '"Insert An Anim File To Convert"' 'RAM:' 'noname.anim' '#?'
IF rc = 0 THEN
animname = result
ELSE
exit(RC)
ENDIF
RequestFile '"Insert A Destination XFA Anim Name"' 'Ram:' 'a.xfa' '#?.xfa'
IF rc = 0 THEN
XFAAnim = result
ELSE
exit(RC)
ENDIF
RequestNumber '"Insert Number Of Frames"' 100
IF rc = 0 THEN
frames = result /* Number of frames of the Anim */
ELSE
exit(RC)
ENDIF
LoadBuffer animname FORCE 1 /* Now we load the 1st Frame */
Render Go /* We render it into ImageFX */
Palette 8
LockRange 0 On
/* And Lock The Palette next */
/* Frames will be remapped is */
/* We need it. (Multi pal anims)*/
SaveRenderedAs ILBM outname||0 FORCE /* Save it into T:Frame0 */
ADDRESS "XFA.1" /* Now we call XFA (port is XFA.1) */
FirstFrame 0 /* We Set FirstFrame to 0 */
LastFrame frames /* We Set LastFrame to Anim Frames */
Compression 32I /* Set Compression to 32I */
CloseAnim LOOP /* Set AnimClose Mode to LOOP */
InputName outname /* Input Root Name is T:Frame */
OutputName XFAanim /* XFA Animation Name will be T:a.xfa */
SetProcessor ImageFX /* We Select ImageProcessor Program */
InitXFA /* XFA Initialization */
/* NOTE: BEFORE call InitXFA you have */
/* To perform AT LEAST all settings */
/* We have done inside this example. */
/* Also remember of having the FIRST */
/* Frame of the ANIM saved as IFF, for*/
/* Configuring correctly XFA */
DO t=1 TO frames /* For t=1 TO NFrames... */
ADDRESS "IMAGEFX.1" /* Call ImageFX */
LoadBuffer animname FORCE t /* Load Frame t */
Render Go /* Render It */
x = t-1 /* Output File Name */
n = outname||x
SaveRenderedAs ILBM n FORCE /* Save Picture */
ADDRESS "XFA.1" /* Call XFA */
GetFrame (t-1) /* Load This Frame */
PutFrame /* Put It Inside Anim */
END /* Next */
CloseXFA /* Here We Close XFA Anim*/
Message '"Conversion done."'
ADDRESS "IMAGEFX.1"
LockRange 0 Off
exit /* End Of Arexx Script!! */